-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix inconsistent rendering of shadow routes on client/server-side #3780
Fix inconsistent rendering of shadow routes on client/server-side #3780
Conversation
🦋 Changeset detectedLatest commit: 5a8ce9f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✔️ Deploy Preview for kit-demo canceled. 🔨 Explore the source changes: 7ecba0e 🔍 Inspect the deploy log: https://app.netlify.com/sites/kit-demo/deploys/62052eaf13ccf6000974ba97 |
@benmccann @bluwy please take a look, I'm pretty sure about the params part of the issue, I'll try to deal with the URLSearchParams tomorrow if they don't work with this. |
I also fixed URLSearchParams issues, and I made URLSearchParams and the full |
@PH4NTOMiki if you put "fixes #3727 #3777 #3778" in the PR description it will only link one of the issues. you need to put the word fixes before each issue. I will edit the PR description to update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This needs tests :)
Please only fix one issue per PR — I know it's tempting to do several simultaneously, but it slows things down (if this was two PRs we could add a test for the url.search
addition and merge that immediately), makes reviews harder, and muddies the changelog and git history.
On the invalidation issue, the most straightforward logic would just be whether or not the pathname or query has changed. We need to have a proper think about what invalidation logic would look like if we had layout-shadowing endpoints, but this PR probably isn't the right place for it.
@Rich-Harris thanks Rich for reviewing, and thank you for the hard work on Svelte, I was planning to fix just #3727 but when i was reading the comments on that issue, many said the related/duplicate problem was with URLSearchParams and since they were kinda related I decided to fix them both in this PR. Thankss |
Whichever you prefer — converting this PR would be fine (we always squash commits before merging) |
@Rich-Harris done |
Thanks for this fix, @PH4NTOMiki! Looking forward to trying it out. |
@Rich-Harris @benmccann can we merge this? |
@bluwy can we merge this, cause it's a pretty serious bug. |
@PH4NTOMiki lint and the tests are failing. can you fix those issues? |
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
This PR fixes inconsistent URL handling for shadow routes on the client/server-side. and because of that it also
fixes #3777
fixes #3778
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpx changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0